const parsedUrl = new URL(document.currentScript.src);
var commonbasePath=parsedUrl.origin;
var basePath=getRootPath();

document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/base/common.css" async />');
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/layui/css/layui.css" async />');
// Element-UI
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/2.15.12/element.css" async />');
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/vue-treeselect.min.css"  async />');
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/quill.bubble.1.3.4.css" async  />');
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/quill.core.1.3.4.css" async />');
document.write('<link rel="stylesheet" type="text/css" href="'+commonbasePath+'/common/vue/plugins/quill.snow.1.3.4.css"  async />');
document.write('<script src="'+commonbasePath+'/common/jquery/jquery.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/layui/layui.js" type="text/javascript" ></script>');
//修改阿里在线图标地址
// document.write('<script src="'+commonbasePath+'/common/iconfont/iconfont.js" type="text/javascript" async ></script>');
// document.write('<link rel="stylesheet" href="'+commonbasePath+'/common/iconfont/iconfont.css" type="text/css" async ></link>');

document.write('<script src="'+commonbasePath+'/common/jquery/cookie/jquery.cookie.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/base/common.js" type="text/javascript" ></script>');
// Vue + Element-UI
document.write('<script src="'+commonbasePath+'/common/vue/vue.2.7.7.min.js" type="text/javascript"  ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/2.15.12/element.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/vue-treeselect.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/vue-cropper.0.4.9.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/sortable.min.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/quilljs.1.3.4.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/quill-vue-editor.3.0.6.js" type="text/javascript"  ></script>');
document.write('<script src="'+commonbasePath+'/common/vue/plugins/file-saver.min.js" type="text/javascript" ></script>');
/* 加载seajs */
document.write('<script src="'+commonbasePath+'/common/load/load.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/load/load-css.js" type="text/javascript" ></script>');
document.write('<script src="'+commonbasePath+'/common/load/load-text.js" type="text/javascript" ></script>');
/* 加载echarts */
// document.write('<script src="'+commonbasePath+'/common/echarts/echarts.min.js" type="text/javascript" ></script>');
/*
 获取网站目录
 */
function getRootPath() {
	var pathName=window.document.location.pathname;
	var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
	return "http://"+location.host +projectName ;
}
